package com.zjxf.service;

import com.zjxf.base.bean.po.UmsAdmin;
import com.zjxf.base.bean.vo.VoUmsAdmin;
import com.zjxf.base.common.OperationException;

import java.util.Optional;

/**
 * 管理员用户service
 *
 * @author ZhangWei
 * @date 2021/3/26/026 19:00
 */
public interface UmsAdminService {

    /**
     * 用户id
     *
     * @param id 主键id
     * @return Optional<User>
     */
    Optional<UmsAdmin> findById(Long id);

    /**
     * 根据用户名称查询用户
     */
    Optional<UmsAdmin> findByUsernameAndDeleteState(String userName, Integer deleteState);

    /**
     * 添加或修改
     *
     * @param voAdmin
     */
    void addOrUpdate(VoUmsAdmin.addOrUpdate voAdmin) throws OperationException;
}
